export const getStatus_Lamp = (state, data)=>{
  let lamp1 = data.valu.slice(0, 5);
  let lamp2 = data.valu.slice(5, 10);
  let mun1 = 0;
  // let mun2 = 0;
  for (let i = 0; i < lamp1.length; i++) {
    if (lamp1[i].v != 0) {
      state.Status_Lamp = `生产线${i +
        1}区域指示灯异常，请停止生产，派人查看`;
    } else {
      mun1++;
    }
  }
  // for (let j = 0; j < lamp2.length; j++) {
  //   if (lamp2[j].v != "1") {
  //     state.Status_Lamp = `生产线${j+1}号区域指示灯异常，请停止生产，派人查看`;
  //   } else {
  //     mun2++;
  //   }
  // }
  if (mun1 == 5) {
    state.Status_Lamp = `生产区域正常运行`;
  }
  console.log("区域指示灯异常", state.Status_Lamp);
  console.log("区域指示灯异常==>", data);
}

